<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8">
		<title>注册</title>
		<link rel="stylesheet" href="../../assets/css/relys/login.css">
	</head>
	<!--TODO 修改css-->
	<body>
		<div class="wrapper companyactive" id="app">
			<div class="form-box companyregister" id="companyregister">
				<h2>企业注册</h2>
				<form action="#">
					<div class="input-box">
						<span class="icon"><ion-icon name="person-circle"></ion-icon></span>
						<input v-model="username" type="text" required>
						<label>账号</label>
					</div>
					<div class="input-box">
						<span class="icon"><ion-icon name="lock-closed"></ion-icon></span>
						<input v-model="mima" type="password" required>
						<label>密码</label>
					</div>
					<div class="input-box">
						<span class="icon"><ion-icon name="people"></ion-icon></span>
						<input v-model="qiyemingcheng" type="text" required>
						<label>企业名称</label>
					</div>
					<div class="input-box">
						<span class="icon"><ion-icon name="person"></ion-icon></span>
						<input v-model="fuzeren" type="text" required>
						<label>负责人</label>
					</div>
					<div class="input-box">
						<span class="icon"><ion-icon name="call"></ion-icon></span>
						<input v-model="lianxidianhua" type="text" required>
						<label>联系方式</label>
					</div>
					<div class="input-box">
						<span class="icon"><ion-icon name="mail"></ion-icon></span>
						<input v-model="qiyeyouxiang" type="email" required>
						<label>企业邮箱</label>
					</div>
					<button type="button" class="btn" @click="userRegister">注册</button>
					<div class ="login-register"><p>已有账号?
						<a href="../login/login.html" class="companylogin-link">登录</a></p></div>
				</form>
			</div>
		</div>
		<script src="../../assets/js/relys/jquery.js"></script>
		<script src="../../assets/js/relys/vue.js"></script>
		<script src="../../assets/js/api/api.js"></script>
		<script src="../../assets/js/api/defaultuser.js"></script>
		<script type="text/javascript">
			var app = new Vue({
				el: "#app",
				data: {
					username: '',
					mima: '',
					"qiyemingcheng": "",
					"fuzeren": "",
					"lianxidianhua": "",
					"qiyeyouxiang": "",
				},
				methods: {
					userRegister(){
						var data = {
							"qiyebianhao": this.username,
							"mima": this.mima,
							"qiyemingcheng": this.qiyemingcheng,
							"fuzeren": this.fuzeren,
							"lianxidianhua": this.lianxidianhua,
							"qiyeyouxiang": this.qiyeyouxiang,
						}
						register('qiyexinxi', data, function(res){
							if(res.code==0){
								alert('注册成功')
								window.parent.location.href = '../login/login.html'
							}
						})
					}
				}
			})
		</script>
	</body>
<!--	<body>
	<div class="wrapper" id="app">

		<div class="form-box companyregister">
			<h3>注册</h3>
			<form id="loginForm">
				<div class="input-box">
					<label>账号:</label>
					<input v-model="username" type="text" name="" placeholder="请输入账号">
				</div>
				<div class="input-box">
					<label>密码:</label>
					<input v-model="mima" type="password" name="" placeholder="密码">
				</div>
				<div class="input-box">
					<label>企业名称:</label>
					<input v-model="qiyemingcheng" type="text" name="" placeholder="请输入企业名称">
				</div>
				<div class="input-box">
					<label>负责人:</label>
					<input v-model="fuzeren" type="text" name="" placeholder="请输入负责人">
				</div>
				<div class="input-box">
					<label>联系电话:</label>
					<input v-model="lianxidianhua" type="text" name="" placeholder="请输入联系电话">
				</div>
				<div class="input-box">
					<label>企业邮箱:</label>
					<input v-model="qiyeyouxiang" type="text" name="" placeholder="请输入企业邮箱">
				</div>
			</form>
			<a href="../login/login.html">已有账号？去登录</a>
			<button type="button" @click="userRegister">注册</button>
		</div>
	</div>
	<script src="../../assets/js/relys/jquery.js"></script>
	<script src="../../assets/js/relys/vue.js"></script>
	<script src="../../assets/js/api/api.js"></script>
	<script src="../../assets/js/api/defaultuser.js"></script>
	<script type="text/javascript">
		var app = new Vue({
			el: "#app",
			data: {
				username: '',
				mima: '',
				"qiyemingcheng": "",
				"fuzeren": "",
				"lianxidianhua": "",
				"qiyeyouxiang": "",
			},
			methods: {
				userRegister(){
					var data = {
						"qiyebianhao": this.username,
						"mima": this.mima,
						"qiyemingcheng": this.qiyemingcheng,
						"fuzeren": this.fuzeren,
						"lianxidianhua": this.lianxidianhua,
						"qiyeyouxiang": this.qiyeyouxiang,
					}
					register('qiyexinxi', data, function(res){
						if(res.code==0){
							alert('注册成功')
							window.parent.location.href = '../login/login.html'
						}
					})
				}
			}
		})
	</script>
	</body>-->
</html>
